package com.tx.axure.tkaxureweb.config;

import com.tx.axure.tkaxureweb.interceptor.SourceInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class InterceptorTrainConfigurer implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        添加拦截器
        registry.addInterceptor(new SourceInterceptor()).addPathPatterns("/**").excludePathPatterns("/static/**","/login_manager/**","/list","/login","/error","/to_ui");
    }
}
